<template>
  <div class="siteAside-container">
    <template v-if="data">
      <Avatar class="avatar" :url="data.avatar" />
      <h1 class="title">{{ data.siteTitle }}</h1>
    </template>

    <Menu v-if="data" />
    <Contact class="contact" v-if="data" />

    <a href="https://beian.miit.gov.cn/#/Integrated/index"
      ><p v-if="data" class="footer">{{ data.icp }}</p></a
    >
  </div>
</template>

<script>
import Avatar from "@/components/Avatar";
import Menu from "./Menu";
import Contact from "./Contact";
import { mapState } from "vuex";
export default {
  components: {
    Avatar,
    Menu,
    Contact,
  },
  computed: mapState("setting", ["data"]),
};
</script>

<style scoped lang="less">
@import "~@/styles/var.less";
.siteAside-container {
  width: 100%;
  height: 100%;
  background-color: @dark;
  padding: 20px 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}
.avatar {
  margin: 0 auto;
}

.title {
  font-size: 1.3em;
  color: @lightWords;
  text-align: center;
}
.contact {
  font-size: 15px;
}
.menu {
  margin: 40px 0;
}

.footer {
  text-align: center;
  font-size: 14px;
  color: @lightWords;
}
</style>